In a subsequent commit we will add a function to open the screenshot UI
in the screencast mode. This argument will allow us to do that without
resorting to accessing private fields from the outside.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2107>
}
});
+const UIMode = {
+ SCREENSHOT: 0,
+ SCREENCAST: 1,
+};
+
var ScreenshotUI = GObject.registerClass({
Properties: {
'screencast-in-progress': GObject.ParamSpec.boolean(
this._screenSelectors[Main.layoutManager.primaryIndex].checked = true;
}
- async open() {
+ async open(mode = UIMode.SCREENSHOT) {
if (this._openingCoroutineInProgress)
return;
if (this._screencastInProgress)
return;
+ this._castButton.checked = mode === UIMode.SCREENCAST;
+
if (!this.visible) {
// Screenshot UI is opening from completely closed state
// (rather than opening back from in process of closing).